var e = require("../common").getProjectNameLang, n = getApp(), a = e(), i = [ {
    name: a + "大全",
    icon: "icon-fontclass-jianglijilu",
    url: "/packageH/project_verification/VerificationProjectList/VerificationProjectList"
}, {
    name: "我的" + a,
    icon: "icon-fontclass-shangpindingdan",
    url: "/packageH/project_verification/MyProject/MyProject"
}, {
    name: "使用记录",
    icon: "icon-fontclass-dingdanguanli",
    url: "/packageH/project_verification/WriteOffRecord/WriteOffRecord?type=used"
} ], o = {
    name: "商户记录",
    icon: "icon-massage_apply",
    url: "/packageH/project_verification/WriteOffRecord/WriteOffRecord?type=store"
}, t = {
    name: "核销员记录",
    icon: "icon-yq_massage",
    url: "/packageH/project_verification/WriteOffRecord/WriteOffRecord?type=staff"
};

Page({
    data: {
        navs: [],
        userInfo: {
            avatarUrl: "",
            uid: "",
            nickName: ""
        },
        auths: {
            is_boss: 0,
            is_worker: 0
        },
        projectNameLang: a
    },
    onLoad: function(e) {
        this.getUserBaseInfo();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    getUserBaseInfo: function() {
        var e = this, a = n.getNetAddresss("plugin.store-projects.frontend.index.get-base-info");
        n._getNetWork({
            url: a,
            data: {},
            success: function(n) {
                var a = n.data.data, r = JSON.parse(JSON.stringify(i));
                a.is_boss && r.push(o), a.is_worker && r.push(t), e.setData({
                    navs: r,
                    userInfo: {
                        avatarUrl: a.member_avatar_image,
                        uid: a.member_uid,
                        nickName: a.member_nickname
                    }
                });
            }
        });
    }
});